package com.nsgf.library.data.bean;

import com.nsgf.library.data.api.APIs;
import com.nsgf.library.utils.Kits;

import java.util.ArrayList;
import java.util.List;

public class OrderDetailBean {

    private int id;
    private String no;
    private int type;
    private long createTime;
    private String userRemark;
    private int status;
    private int productCount;
    private String finishTime;
    private String cancelTime;
    private boolean commentStatus;
    private boolean payStatus;
    private int payOrderId;
    private Long payTime;
    private long payExpireTime;
    private String payChannelCode;
    private String payChannelName;
    private double totalPrice;
    private double discountPrice;
    private double deliveryPrice;
    private double adjustPrice;
    private double payPrice;
    private int deliveryType;
    private int logisticsId;
    private String logisticsName;
    private String logisticsNo;
    private String deliveryTime;
    private String receiveTime;
    private String receiverName;
    private String receiverMobile;
    private int receiverAreaId;
    private String receiverAreaName;
    private String receiverDetailAddress;
    private int pickUpStoreId;
    private String pickUpVerifyCode;
    private int refundStatus;
    private int refundPrice;
    private int couponId;
    private double couponPrice;
    private double pointPrice;
    private double vipPrice;
    private int combinationRecordId;
    private List<OrderListBean.ListBean.ItemsBean> items;

    private String deliveryTypeName;
    private String tenantName;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getCreateTime() {
        return Kits.Date.getYmdhhms(createTime);
    }


    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getUserRemark() {
        return userRemark;
    }

    public void setUserRemark(String userRemark) {
        this.userRemark = userRemark;
    }

    public int getStatus() {

        return status;
    }

    public String getStatusSrc() {

        switch (getStatus()) {
            case 0:
                return "待支付";
            case 10:
                return "已支付";
            case 20:
                return "待发货";
            case 30:
                return "已发货";
            case 40:
                return "已取消";
            default:
                return "已完成";
        }
    }


    public void setStatus(int status) {
        this.status = status;
    }

    public int getProductCount() {
        return productCount;
    }

    public void setProductCount(int productCount) {
        this.productCount = productCount;
    }

    public String getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(String finishTime) {
        this.finishTime = finishTime;
    }

    public String getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(String cancelTime) {
        this.cancelTime = cancelTime;
    }

    public boolean isCommentStatus() {
        return commentStatus;
    }

    public void setCommentStatus(boolean commentStatus) {
        this.commentStatus = commentStatus;
    }

    public boolean isPayStatus() {
        return payStatus;
    }
    public String isPayStatusSrc() {
        return isPayStatus()?"已支付":"未支付";
    }



    public void setPayStatus(boolean payStatus) {
        this.payStatus = payStatus;
    }

    public int getPayOrderId() {
        return payOrderId;
    }

    public void setPayOrderId(int payOrderId) {
        this.payOrderId = payOrderId;
    }

    public String getPayTime() {
        if (null == payTime)
            return "";
        return Kits.Date.getYmdhhms(payTime);
    }

    public void setPayTime(Long payTime) {
        this.payTime = payTime;
    }

    public String getPayExpireTime() {
        return Kits.Date.getYmdhhms(payExpireTime);
    }

    public void setPayExpireTime(long payExpireTime) {
        this.payExpireTime = payExpireTime;
    }

    public String getPayChannelCode() {
        return payChannelCode;
    }

    public void setPayChannelCode(String payChannelCode) {
        this.payChannelCode = payChannelCode;
    }

    public String getPayChannelName() {
        return payChannelName;
    }

    public void setPayChannelName(String payChannelName) {
        this.payChannelName = payChannelName;
    }

    public int getDeliveryType() {
        return deliveryType;
    }

    public void setDeliveryType(int deliveryType) {
        this.deliveryType = deliveryType;
    }

    public int getLogisticsId() {
        return logisticsId;
    }

    public void setLogisticsId(int logisticsId) {
        this.logisticsId = logisticsId;
    }

    public String getLogisticsName() {
        return logisticsName;
    }

    public void setLogisticsName(String logisticsName) {
        this.logisticsName = logisticsName;
    }

    public String getLogisticsNo() {
        return logisticsNo;
    }

    public void setLogisticsNo(String logisticsNo) {
        this.logisticsNo = logisticsNo;
    }

    public String getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(String deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public String getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(String receiveTime) {
        this.receiveTime = receiveTime;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverMobile() {
        return receiverMobile;
    }

    public String getNameAndReceiverMobile() {
        return getReceiverName() + " " + getReceiverMobile();
    }

    public void setReceiverMobile(String receiverMobile) {
        this.receiverMobile = receiverMobile;
    }

    public int getReceiverAreaId() {
        return receiverAreaId;
    }

    public void setReceiverAreaId(int receiverAreaId) {
        this.receiverAreaId = receiverAreaId;
    }

    public String getReceiverAreaName() {
        return receiverAreaName;
    }

    public String getTotalPrice() {
        return APIs.df.format(totalPrice / 100);
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public double getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(double discountPrice) {
        this.discountPrice = discountPrice;
    }

    public double getDeliveryPrice() {
        return deliveryPrice;
    }

    public void setDeliveryPrice(double deliveryPrice) {
        this.deliveryPrice = deliveryPrice;
    }

    public double getAdjustPrice() {
        return adjustPrice;
    }

    public void setAdjustPrice(double adjustPrice) {
        this.adjustPrice = adjustPrice;
    }

    public String getPayPrice() {
        return "￥" + APIs.df.format(payPrice / 100);
    }

    public void setPayPrice(double payPrice) {
        this.payPrice = payPrice;
    }

    public int getRefundPrice() {
        return refundPrice;
    }

    public double getCouponPrice() {
        return couponPrice;
    }

    public void setCouponPrice(double couponPrice) {
        this.couponPrice = couponPrice;
    }

    public double getPointPrice() {
        return pointPrice;
    }

    public void setPointPrice(double pointPrice) {
        this.pointPrice = pointPrice;
    }

    public double getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(double vipPrice) {
        this.vipPrice = vipPrice;
    }

    public void setReceiverAreaName(String receiverAreaName) {
        this.receiverAreaName = receiverAreaName;
    }

    public String getReceiverDetailAddress() {
        return receiverDetailAddress;
    }

    public void setReceiverDetailAddress(String receiverDetailAddress) {
        this.receiverDetailAddress = receiverDetailAddress;
    }

    public int getPickUpStoreId() {
        return pickUpStoreId;
    }

    public void setPickUpStoreId(int pickUpStoreId) {
        this.pickUpStoreId = pickUpStoreId;
    }

    public String getPickUpVerifyCode() {
        return pickUpVerifyCode;
    }

    public void setPickUpVerifyCode(String pickUpVerifyCode) {
        this.pickUpVerifyCode = pickUpVerifyCode;
    }

    public int getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(int refundStatus) {
        this.refundStatus = refundStatus;
    }

    public void setRefundPrice(int refundPrice) {
        this.refundPrice = refundPrice;
    }

    public int getCouponId() {
        return couponId;
    }

    public void setCouponId(int couponId) {
        this.couponId = couponId;
    }

    public int getCombinationRecordId() {
        return combinationRecordId;
    }

    public void setCombinationRecordId(int combinationRecordId) {
        this.combinationRecordId = combinationRecordId;
    }

    public List<OrderListBean.ListBean.ItemsBean> getItems() {
        if (null == items)
            items = new ArrayList<>();
        return items;
    }

    public void setItems(List<OrderListBean.ListBean.ItemsBean> items) {
        this.items = items;
    }

    public String getDeliveryTypeName() {
        return deliveryTypeName;
    }

    public void setDeliveryTypeName(String deliveryTypeName) {
        this.deliveryTypeName = deliveryTypeName;
    }

    public String getTenantName() {
        return tenantName;
    }

    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }
}
